package com.manage.platform.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import java.io.Serializable;

/**
 * 存储配置类
 */
@Data
@Component
@Validated
@ConfigurationProperties(prefix = "storage")
public class StorageConfig implements Serializable {

    private static final long serialVersionUID = 1L;

    private boolean enabled = true;

    private Config config = new Config();

    private Local local = new Local();

    @Data
    public static class Config {
        private String type = "local";
        private String domain = "http://localhost:8080";
    }

    @Data
    public static class Local {
        private String path = "/data/upload";
        private String url = "upload";
    }


}